//
//  Gate.m
//  Chokobo
//
//  Created by David Hsieh on 8/15/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "Gate.h"


@implementation Gate

static char currentEntryId = 'A';

- (id) init {
	[super init];
	
	return self;
}

- (id) initWithInputs:(NSArray *)gateInputs {
	[super init];
	inputs = gateInputs;
	name = [NSString stringWithFormat:@"Gate %c", currentEntryId++];
	return self;
}

- (bool) sense {

	return false;
}

- (NSMutableArray *)show { 
	NSMutableArray *paths = [[NSMutableArray alloc] init];
	if([outputGates count] > 0) {
		for(Gate *gate in outputGates) {
			[paths addObject:[NSString stringWithFormat:@"-> %@",gate.name]];
		}
		
	}
	
	return paths;
}

@synthesize inputs;

@end
